<div id="<%= dom_id(project) %>" class='<%= project.archived? ? "bg-base-100/80" : "bg-base-100 border-base-300" %> border-l-4 p-8 flex flex-col items-stretch gap-4 border rounded-md text-md'>
  <div class="flex flex-col md:flex-row md:justify-between gap-4 items-center">
    <div class="flex gap-4">
      <div class="flex items-center gap-2 text-base-content font-medium text-xl">
        <%= link_to project_issues_path(project), data: { turbo_frame: "_top" } do %>
          <%= project.name%>
        <% end %>
        <% if project.archived? %>
          <span class="badge badge-warning">
            <%= t('archived').capitalize %>
          </span>
        <% end %>
      </div>
    </div>
    <div class="flex items-stretch justify-center md:place-self-end gap-4">
      <%= link_to t('actions.edit'),
                  edit_project_path(project),
                  class: "btn btn-ghost btn-primary",
                  data: { turbo_frame: "project_form" }  %>
      <% if project.archived? %>
        <%= link_to t('actions.unarchive'),
                    unarchive_project_path(project),
                    class: "btn btn-ghost btn-success",
                    data: { turbo_method: :put, turbo_confirm: t("confirmations.unarchive") }
                    %>
        <%= link_to t('actions.remove'),
                    project_path(project),
                    class: "btn btn-ghost btn-error",
                    data: { turbo_method: :delete, turbo_confirm: t(".confirm_destroy"), turbo_frame: "_top" }
                    %>
      <% else %>
        <%= link_to t('actions.archive'),
                    archive_project_path(project),
                    class: "btn btn-ghost btn-error",
                    data: { turbo_method: :put, turbo_confirm: t(".confirm_archive") }
                    %>
      <% end  %>
    </div>
  </div>
  <% unless project.archived? %>
    <div class="flex w-full flex-col lg:flex-row gap-4 text-sm justify-end items-center">
      <%= link_to time_entries_path(new_entry: { project_id: project.id }),
          class: "btn btn-neutral  tour--time-tracking",
          data: { turbo_frame: "_top" } do %>
        <%= icon_for(:time_entries) %>
        <%= t("actions.start_time_tracking") %>
      <% end %>
      <%= link_to project_issues_path(project),
          class: "btn btn-neutral  tour--issues-list",
          data: { turbo_frame: "_top" } do %>
        <%= icon_for(:issues) %>
        <%= Issue.model_name.human.pluralize %>
      <% end %>
      <%= link_to visualization_path(project.default_visualization),
          class: "btn btn-neutral  tour--workflow-board",
          data: { turbo_frame: "_top" } do %>
        <%= icon_for(:boards) %>
        <%= t("actions.go_to_board") %>
      <% end %>
    </div>
  <% end %>
</div>
